<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改作品统计')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-stat-edit" th:object="${actStat}">
            <input name="gameId" th:field="*{gameId}" type="hidden">
            <input name="schoolId" th:field="*{schoolId}" type="hidden">
            <input name="facultyId" th:field="*{facultyId}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">大赛名称：</label>
                <div class="col-sm-8">
                    <input name="gameName" th:field="*{gameName}" class="form-control" type="text" required readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">学校名称：</label>
                <div class="col-sm-8">
                    <input name="school" th:field="*{school}" class="form-control" type="text" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">院系名称：</label>
                <div class="col-sm-8">
                    <input name="faculty" th:field="*{faculty}" class="form-control" type="text" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">参赛院校遴选前作品数：</label>
                <div class="col-sm-8">
                    <input name="realActNum" th:field="*{realActNum}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">参赛学生人数：</label>
                <div class="col-sm-8">
                    <input name="studentNum" th:field="*{studentNum}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">指导老师人数：</label>
                <div class="col-sm-8">
                    <input name="teacherNum" th:field="*{teacherNum}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/stat";
        $("#form-stat-edit").validate({
            focusCleanup: true,
            rules:{
                realActNum:{
                    digits:true
                },
                studentNum:{
                    digits:true
                },
                teacherNum:{
                    digits:true
                }
            },
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-stat-edit').serialize());
            }
        }
    </script>
</body>
</html>
